package com.eltsistemas.hibernate.teste;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

import br.com.graficafuxico.modelo.Album;
import br.com.graficafuxico.modelo.Blog;
import br.com.graficafuxico.modelo.Comentario;
import br.com.graficafuxico.modelo.Foto;
import br.com.graficafuxico.modelo.Usuario;

public class GeraClasse {

	public static void main(String [] args)
	{
		AnnotationConfiguration cfg = new AnnotationConfiguration();
		
		
		cfg.addAnnotatedClass(Album.class);
		cfg.addAnnotatedClass(Foto.class);
		cfg.addAnnotatedClass(Blog.class);
		cfg.addAnnotatedClass(Comentario.class);
		cfg.addAnnotatedClass(Usuario.class);
		
		
		
		SchemaExport ex = new SchemaExport(cfg);
		
		ex.create(true, true);
		System.out.println("************************************Tabela criadas com sucesso****************************************");
	
		
	}

}
